package com.swt.domain;

import javax.persistence.*;

@Entity
public class Course {
    private int courseId;
    private Integer courseNameId;
    private String courseName;
    private String courseCatagory;
    private Integer courseTeacherId;
    private String courseTeacher;
    private String courseTime;
    private Integer courseNum;
    private Integer courseRemainNum;
    private String courseIntroduce;
    private String courseImg;
    private String courseDifficulty;
    private Integer courseClassroomId;
    private String courseClassroom;
    private String courseDate;
    private String courseClubName;
    private Integer courseClubid;
    private String coursePrice;
    private Integer clubClubId;

    @Id
    @Column(name = "course_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    @Basic
    @Column(name = "course_name_id")
    public Integer getCourseNameId() {
        return courseNameId;
    }

    public void setCourseNameId(Integer courseNameId) {
        this.courseNameId = courseNameId;
    }

    @Basic
    @Column(name = "course_name")
    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    @Basic
    @Column(name = "course_catagory")
    public String getCourseCatagory() {
        return courseCatagory;
    }

    public void setCourseCatagory(String courseCatagory) {
        this.courseCatagory = courseCatagory;
    }

    @Basic
    @Column(name = "course_teacher_id")
    public Integer getCourseTeacherId() {
        return courseTeacherId;
    }

    public void setCourseTeacherId(Integer courseTeacherId) {
        this.courseTeacherId = courseTeacherId;
    }

    @Basic
    @Column(name = "course_teacher")
    public String getCourseTeacher() {
        return courseTeacher;
    }

    public void setCourseTeacher(String courseTeacher) {
        this.courseTeacher = courseTeacher;
    }

    @Basic
    @Column(name = "course_time")
    public String getCourseTime() {
        return courseTime;
    }

    public void setCourseTime(String courseTime) {
        this.courseTime = courseTime;
    }

    @Basic
    @Column(name = "course_num")
    public Integer getCourseNum() {
        return courseNum;
    }

    public void setCourseNum(Integer courseNum) {
        this.courseNum = courseNum;
    }

    @Basic
    @Column(name = "course_remainNum")
    public Integer getCourseRemainNum() {
        return courseRemainNum;
    }

    public void setCourseRemainNum(Integer courseRemainNum) {
        this.courseRemainNum = courseRemainNum;
    }

    @Basic
    @Column(name = "course_introduce")
    public String getCourseIntroduce() {
        return courseIntroduce;
    }

    public void setCourseIntroduce(String courseIntroduce) {
        this.courseIntroduce = courseIntroduce;
    }

    @Basic
    @Column(name = "course_img")
    public String getCourseImg() {
        return courseImg;
    }

    public void setCourseImg(String courseImg) {
        this.courseImg = courseImg;
    }

    @Basic
    @Column(name = "course_difficulty")
    public String getCourseDifficulty() {
        return courseDifficulty;
    }

    public void setCourseDifficulty(String courseDifficulty) {
        this.courseDifficulty = courseDifficulty;
    }

    @Basic
    @Column(name = "course_classroom_id")
    public Integer getCourseClassroomId() {
        return courseClassroomId;
    }

    public void setCourseClassroomId(Integer courseClassroomId) {
        this.courseClassroomId = courseClassroomId;
    }

    @Basic
    @Column(name = "course_classroom")
    public String getCourseClassroom() {
        return courseClassroom;
    }

    public void setCourseClassroom(String courseClassroom) {
        this.courseClassroom = courseClassroom;
    }

    @Basic
    @Column(name = "course_date")

    public String getCourseDate() {
        return courseDate;
    }

    public void setCourseDate(String courseDate) {
        this.courseDate = courseDate;
    }

    @Basic
    @Column(name = "course_club_name")
    public String getCourseClubName() {
        return courseClubName;
    }

    public void setCourseClubName(String courseClubName) {
        this.courseClubName = courseClubName;
    }

    @Basic
    @Column(name = "course_clubid")
    public Integer getCourseClubid() {
        return courseClubid;
    }

    public void setCourseClubid(Integer courseClubid) {
        this.courseClubid = courseClubid;
    }

    @Basic
    @Column(name = "course_price")
    public String getCoursePrice() {
        return coursePrice;
    }

    public void setCoursePrice(String coursePrice) {
        this.coursePrice = coursePrice;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Course course = (Course) o;

        if (courseId != course.courseId) return false;
        if (courseNameId != null ? !courseNameId.equals(course.courseNameId) : course.courseNameId != null)
            return false;
        if (courseName != null ? !courseName.equals(course.courseName) : course.courseName != null) return false;
        if (courseCatagory != null ? !courseCatagory.equals(course.courseCatagory) : course.courseCatagory != null)
            return false;
        if (courseTeacherId != null ? !courseTeacherId.equals(course.courseTeacherId) : course.courseTeacherId != null)
            return false;
        if (courseTeacher != null ? !courseTeacher.equals(course.courseTeacher) : course.courseTeacher != null)
            return false;
        if (courseTime != null ? !courseTime.equals(course.courseTime) : course.courseTime != null) return false;
        if (courseNum != null ? !courseNum.equals(course.courseNum) : course.courseNum != null) return false;
        if (courseRemainNum != null ? !courseRemainNum.equals(course.courseRemainNum) : course.courseRemainNum != null)
            return false;
        if (courseIntroduce != null ? !courseIntroduce.equals(course.courseIntroduce) : course.courseIntroduce != null)
            return false;
        if (courseImg != null ? !courseImg.equals(course.courseImg) : course.courseImg != null) return false;
        if (courseDifficulty != null ? !courseDifficulty.equals(course.courseDifficulty) : course.courseDifficulty != null)
            return false;
        if (courseClassroomId != null ? !courseClassroomId.equals(course.courseClassroomId) : course.courseClassroomId != null)
            return false;
        if (courseClassroom != null ? !courseClassroom.equals(course.courseClassroom) : course.courseClassroom != null)
            return false;
        if (courseDate != null ? !courseDate.equals(course.courseDate) : course.courseDate != null) return false;
        if (courseClubName != null ? !courseClubName.equals(course.courseClubName) : course.courseClubName != null)
            return false;
        if (courseClubid != null ? !courseClubid.equals(course.courseClubid) : course.courseClubid != null)
            return false;
        if (coursePrice != null ? !coursePrice.equals(course.coursePrice) : course.coursePrice != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = courseId;
        result = 31 * result + (courseNameId != null ? courseNameId.hashCode() : 0);
        result = 31 * result + (courseName != null ? courseName.hashCode() : 0);
        result = 31 * result + (courseCatagory != null ? courseCatagory.hashCode() : 0);
        result = 31 * result + (courseTeacherId != null ? courseTeacherId.hashCode() : 0);
        result = 31 * result + (courseTeacher != null ? courseTeacher.hashCode() : 0);
        result = 31 * result + (courseTime != null ? courseTime.hashCode() : 0);
        result = 31 * result + (courseNum != null ? courseNum.hashCode() : 0);
        result = 31 * result + (courseRemainNum != null ? courseRemainNum.hashCode() : 0);
        result = 31 * result + (courseIntroduce != null ? courseIntroduce.hashCode() : 0);
        result = 31 * result + (courseImg != null ? courseImg.hashCode() : 0);
        result = 31 * result + (courseDifficulty != null ? courseDifficulty.hashCode() : 0);
        result = 31 * result + (courseClassroomId != null ? courseClassroomId.hashCode() : 0);
        result = 31 * result + (courseClassroom != null ? courseClassroom.hashCode() : 0);
        result = 31 * result + (courseDate != null ? courseDate.hashCode() : 0);
        result = 31 * result + (courseClubName != null ? courseClubName.hashCode() : 0);
        result = 31 * result + (courseClubid != null ? courseClubid.hashCode() : 0);
        result = 31 * result + (coursePrice != null ? coursePrice.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "clubClubId")
    public Integer getClubClubId() {
        return clubClubId;
    }

    public void setClubClubId(Integer clubClubId) {
        this.clubClubId = clubClubId;
    }
}
